package com.mspersonalized.circumscribedAPI.controller;

import com.mspersonalized.circumscribedAPI.service.AlyRxfgService;
import com.mspersonalized.circumscribedAPI.service.ShopifyService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/shopify")
public class ShopifyController {
    @Resource
    private ShopifyService shopifyService;
    @Resource
    private AlyRxfgService alyRxfgService;

    @PostMapping("/upload")
    public String upload(@RequestParam MultipartFile file, @RequestParam String filename) {
        String response = "";
        try {
            String s = shopifyService.uploadImage(file, filename);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return response;
    }
}
